<template>
  <div>
    <xinxi_>
    </xinxi_>
    <div style="height: 40px"></div>
    <h2 style="text-align: center;font-size: 24px">车辆评论</h2>
    <van-list
        v-model="loading"
        :finished="finished"
        finished-text="没有更多了"
        @load="onLoad"
    >
      <van-card
          v-for="(item,index) in list"
          :desc=item.content
          :title=item.tbUser.name
          :thumb=item.tbUser.headPic
      >
        <template #num>
          <van-tag plain type="success">{{ item.addtime }}</van-tag>
        </template>
        <template #tags>
          <van-tag><van-rate v-model="item.useNum" readonly  /></van-tag>
        </template>
      </van-card>
    </van-list>
  </div>
</template>

<script>
import xinxi_ from './cheliangxinxi'
import head_ from "@/components/jingtai_/header.vue";

export default {
  name: "carCommon",
  components: {head_, xinxi_},
  data() {
    return {
      list: [],
      loading: false,
      finished: false,
      msg: "321321",
    };
  },
  methods: {
    onLoad() {
      // 异步更新数据,获取当前用户可以领取的优惠券
      this.$http.get("/system/api/order/getCarComment/"+this.$store.state.carinfo.id).then(resp=>{
        this.list=resp.data.data
      })
        this.finished = true
    },
  }
}
</script>

<style scoped>

</style>
